/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 *
 * @author Administrator
 */

// dong goi du lieu va chuyen di
public class PacketDTO implements Serializable{
    private String systemSign;
    private List<SensorDTO> buffer;
    private Date time = new Date();

    public PacketDTO(String systemSign) {
        this.systemSign = systemSign;
        buffer = new ArrayList<SensorDTO>();
    }
    
    public void addToBuffer(SensorDTO o) {
        buffer.add(o);
    }
    
    public void addAllToBuffer(List<SensorDTO> lst) {
        buffer.addAll(lst);
    }
    
    public void clearBuffer() {
        buffer.clear();
    }

    public List<SensorDTO> getBuffer() {
        return buffer;
    }

    public void setBuffer(List<SensorDTO> buffer) {
        this.buffer = buffer;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getSystemSign() {
        return systemSign;
    }

    public void setSystemSign(String systemSign) {
        this.systemSign = systemSign;
    }
    
}
